package com.example.socketserver.controller;

import com.example.socketserver.socket.WebServer;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author kay
 * @Date 2023/09/18 14:39
 * @Version 1.0
 */
@RestController
public class LoginController {
    @PostMapping(value = "/login")
    public String Login(@RequestParam("name")String name){
        boolean b = WebServer.map.containsKey(name);
        if(b){
            return "fail";
        }
        return "ok";
    }
}
